﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FileDB;
using System.Configuration;

namespace Rem.Objects.Forms.General
{
    public partial class LoginForm : Form
    {
        public LoginForm()
        {
            InitializeComponent();
            this.userNameText.Text = Customer.GetSelfCompany().Name;
            this.userNameText.Enabled = false;
            this.passwordText.PasswordChar = '*';
        }

        public string ExpectedPassword { get; set; }
        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.No;
        }

        private void button1_Click(object sender, EventArgs e)
        {

            if (FileDB.Helper.GetMD5Hash(this.passwordText.Text) == ExpectedPassword)
            {
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();

            }

        }
    }
}
